---
title: Concepts
description: Understanding the fundamentals of search in Airweave
edit-this-page-url: https://github.com/airweave-ai/airweave/blob/main/fern/docs/pages/search/concepts.mdx
slug: search/concepts
---


Airweave's search functionality enables you to query across all your connected data sources simultaneously. This unified search approach means you can find information whether it lives in GitHub, Slack, Asana, or any other integrated system—all through a single API call.

## Core Concepts

### Query

The query is your search text—the question or keywords you're looking for across your data. Airweave uses semantic search, which means it understands the meaning behind your query, not just exact keyword matches.

<CodeGroup>
```text title="Natural Language Questions"
"What are our customer refund policies?"
"Show me recent security incidents"
"Find all discussions about Q4 planning"
```

```text title="Keywords & Phrases"
"payment gateway integration"
"user authentication flow"
"performance optimization"
```

```text title="Complex Queries"
"customer complaints about shipping delays in the last month"
"technical debt in the authentication module"
"feature requests related to mobile app"
```
</CodeGroup>

### Response Types

Airweave provides two response formats, each suited to different use cases:

**Raw Response (`raw`)**: Returns the actual search results as structured data. Use this when you need to process results programmatically or display them in your own interface.

**Completion Response (`completion`)**: Returns an AI-generated natural language answer based on the search results. The AI synthesizes information from multiple sources into a coherent response. Use this for conversational interfaces or when you need summarized insights.

### Query Expansion

Query expansion improves search recall by automatically generating related search terms. This helps find relevant content that might use different terminology than your original query.

| Strategy | Description | Use Case |
|----------|-------------|----------|
| `auto` | Let Airweave decide whether to expand based on query complexity | Default choice for most searches |
| `llm` | Uses language models to generate synonyms and related terms | Maximum recall for broad topics |
| `no_expansion` | Searches only for the exact query | Precise searches or proper nouns |

### Pagination

For searches returning many results, pagination controls help manage the response size:

- **`limit`**: Number of results per page (1-1000, default: 20)
- **`offset`**: Number of results to skip (default: 0)

```python
# Get the second page of 50 results
search_request = SearchRequest(
    query="project updates",
    limit=50,
    offset=50  # Skip first 50 results
)
```

<Warning>
When using query expansion (`auto` or `llm`), pagination may return inconsistent results across requests. For reliable pagination, set `expansion_strategy="no_expansion"`.
</Warning>

### Score Threshold

The score threshold filters results by relevance score (0.0-1.0). Higher scores indicate better semantic matches. Setting a threshold helps eliminate marginally relevant results.

```python
# Only return highly relevant results
search_request = SearchRequest(
    query="security vulnerabilities",
    score_threshold=0.7  # Only results with 70%+ relevance
)
```

### Summarization

When enabled, the summarization feature provides a concise overview of the search results. This is particularly useful when dealing with large result sets or when you need a quick understanding of the findings.

## Quick Reference

| Parameter | Type | Default | Valid Range | Description |
|-----------|------|---------|-------------|-------------|
| `query` | string | required | 1-1000 chars | Search text |
| `response_type` | enum | `raw` | `raw`, `completion` | Response format |
| `expansion_strategy` | enum | `auto` | `auto`, `llm`, `no_expansion` | Query expansion method |
| `limit` | integer | 20 | 1-1000 | Results per page |
| `offset` | integer | 0 | ≥ 0 | Results to skip |
| `score_threshold` | float | none | 0.0-1.0 | Minimum relevance score |
| `summarize` | boolean | false | - | Enable result summarization |
| `filter` | object | none | - | Qdrant filter object |

## Next Steps

- Learn about [filtering search results](/search/filters) to narrow down results by metadata
- Explore [practical examples](/search/examples) of search queries
- **[API Reference](/api-reference/collections/search-collection-collections-readable-id-search-get)** - Complete API details
